Skip to content

Conversation

@gigerdo
Copy link
Member

@gigerdo gigerdo commented Apr 25, 2025

Fixes two issues that lead to confusing errors being shown:

  • The agent_policy resource did not throw an error if getting the stack version fails
  • When getting the stack version fails, it only returned the http connection error, not actually stating what it was trying to do.

In combination this will now lead to an error like

Error: failed to get version from Kibana API: Get "http://localhost:5601/api/status": dial tcp [::1]:5601: connect: connection refused, Please ensure a working 'kibana' endpoint is configured.

@gigerdo gigerdo requested review from a team and tobio April 25, 2025 08:23
Fixes two issues that lead to confusing errors being shown:

- The `agent_policy` resource did not throw an error if getting the stack version fails
- When getting the stack version fails, it only returned the http connection error, not actually stating what it was trying to do.

In combination this will now lead to an error like
```
Error: failed to get version from Kibana API. Please ensure a working 'kibana' endpoint is configured. Error: Get "http://localhost:5601/api/status": dial tcp [::1]:5601: connect: connection refused
 ``
Copy link

@claudia-correia claudia-correia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍🏻

@gigerdo gigerdo merged commit 44b055a into elastic:main Apr 25, 2025
23 checks passed
@tobio
Copy link
Member

tobio commented Apr 25, 2025

@gigerdo are you able to add a change log entry for this too?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants